package com.softline.documentsmall.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.softline.documentsmall.entity.ThumbsUp;
import com.softline.documentsmall.entity.ThumbsUpVO;

import java.util.List;

public interface ThumbsUpService extends IService<ThumbsUp> {

    /**
     * 点赞新增
     * @param thumbsUp
     * @return
     */
    int add(ThumbsUp thumbsUp);

    /**
     * 根据词条id和用户id删除点赞记录
     * @param passportId
     * @param dictionaryId
     */
    void delete(String passportId, Integer dictionaryId);

    /**
     * 查询个人点赞列表页
     * @param passportId
     * @param type
     * @return
     */
    List<ThumbsUpVO> getReconds(String passportId, String type,Integer pageNum,Integer pageSize);

    /**
     * 根据词条id和用户查询是否点赞，1：收藏，0：未收藏
     * @param passportId
     * @param dictionaryId
     * @return
     */
    ThumbsUp isThumbsUp(String passportId, Integer dictionaryId);
}
